package calao.client;

import java.util.Comparator;

import com.google.gwt.user.client.rpc.IsSerializable;

public class Country 
implements IsSerializable
{
	
	String code;
	String name;
	
	public Country() { }
	
	public Country(String code, String name) 
	{
		this.code = code;
		this.name = name;
	}
	
	public String getCode() 
	{
		return code;
	}
	
	public void setCode(String code) 
	{
		this.code = code;
	}
	
	public String getName() 
	{
		return name;
	}
	
	public void setName(String name)
	{
		this.name = name;
	}
	
	public static Comparator getComparator()
	{
		return new Comparator() {
			public int compare(Object o1, Object o2) {
				return ((Country)o1).name.compareTo(((Country)o2).name);
			}
		};
	}

}
